/**
 * Copyright (c) Enalean, 2018. All Rights Reserved.
 *
 * This file is a part of Tuleap.
 *
 * Tuleap is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * Tuleap is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Tuleap. If not, see <http://www.gnu.org/licenses/>.
 */

.milestone {
    margin: 0 0 $tlp-half-spacing;
}

.milestone-header {
    display: flex;
    position: sticky;
    z-index: 2;
    top: 44px;
    align-items: center;
    transition: background .1s linear;
    border-bottom: 1px solid darken($tlp-ui-white, 2%);
    background: $tlp-ui-white;
    color: $tlp-ui-dimmed;
    cursor: pointer;

    &:hover {
        transition: background .1s linear;
        background: darken($tlp-ui-white, 2%);
    }
}

.milestone-header-label {
    flex: 0 0 auto;
}

.milestone-action-button {
    margin: 0 0 0 $tlp-half-spacing;

    &.ng-enter {
        animation: fadeIn .2s;
    }

    &.ng-leave {
        animation: fadeOut .2s;
    }
}

.milestone-header-spacer {
    flex: 1 1 auto;
    min-width: $tlp-spacing;
}

.milestone-header-dates {
    color: $tlp-ui-dimmed;
    font-size: 12px;
}

.milestone-header-status {
    margin: 0 0 0 $tlp-half-spacing;
}

.milestone-info {
    display: flex;
    align-items: center;
    padding: $tlp-half-spacing $tlp-spacing;
    background: darken($tlp-ui-white, 2%);
}

.milestone-info-badge {
    margin: 0 5px 0 0;
}

.milestone-spacer {
    flex: 1 1 auto;
}

.milestone-info-link {
    margin: 0 0 0 15px;
    font-size: 14px;

    > .fa {
        margin: 0 5px 0 0;
        font-size: 12px;
        text-decoration: none;
    }

    @media screen and (max-width: 1400px) {
        > span {
            display: none;
        }

        > .fa {
            font-size: 14px;
        }
    }
}

.milestone-content {
    position: relative;
}

.milestone-backlog-items {
    min-height: 70px;
    padding: $tlp-spacing;
    border: 1px solid $tlp-ui-border-normal;
    border-radius: 3px;
    background: lighten($tlp-theme-background-color, 2%);
}

.empty-milestone {
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translate(-50%, 100%);
    fill: transparentize($tlp-theme-color, .8);
}

.milestone-content-loading {
    @extend %loader;
}
